package com.sharemarking.system.mapper;

import com.sharemarking.system.dto.Select2Dto;
import org.apache.ibatis.annotations.Select;
import com.sharemarking.system.entity.Area;

import java.util.List;

public interface AreaMapper {
	@Select("SELECT seq_code as code,node_name as name FROM sys_area WHERE seq_code=#{code} ")
	Area get(String code);
	@Select("SELECT seq_code as id,node_name as text FROM sys_area WHERE parent_seq_code=#{code} ")
	List<Select2Dto> getList(String code);

	@Select("SELECT seq_code FROM sys_area WHERE node_name=#{name} Limit 1")
	String getByName(String name);
}
